package model;

import java.io.Serializable;
import java.util.Date;
import java.util.List;


import org.hibernate.annotations.Cascade;
import org.hibernate.annotations.CascadeType;


import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToOne;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.OneToMany;

@Entity
public class Kunden implements Serializable{
	
	
	private static final long serialVersionUID = 1L;
	 
	   
	@Id
	@GeneratedValue
	int id;
	
	
	@Column
	String name;
	
	  
	@Column 
	String rechnungAdrresse;
	
	@Column
	String firmenname;
	
	@Column
	String notiz;
	
	@Column
	float rabatt;
	
	@Column
	String Tel;
	
	@Column
	String Email;
	
	@Column
	String web;
	
	@Column
	String fax;

	@Temporal(TemporalType.TIMESTAMP) 
	@Column
	private Date dateAdd;
	
	@Temporal(TemporalType.TIMESTAMP) 
	@Column
	private Date dateUpdate;
	
	
	@OneToMany(mappedBy = "kunden")
	@Cascade({CascadeType.SAVE_UPDATE, CascadeType.DETACH, CascadeType.MERGE, CascadeType.PERSIST, CascadeType.DELETE})
	private List<Reservierung> reservierung;
	

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getRechnungAdrresse() {
		return rechnungAdrresse;
	}

	public void setRechnungAdrresse(String rechnungAdrresse) {
		this.rechnungAdrresse = rechnungAdrresse;
	}

	public String getFirmenname() {
		return firmenname;
	}

	public void setFirmenname(String firmenname) {
		this.firmenname = firmenname;
	}

	public String getNotiz() {
		return notiz;
	}

	public void setNotiz(String notiz) {
		this.notiz = notiz;
	}

	public float getRabatt() {
		return rabatt;
	}

	public void setRabatt(float rabatt) {
		this.rabatt = rabatt;
	}

	public String getTel() {
		return Tel;
	}

	public void setTel(String tel) {
		Tel = tel;
	}

	public String getEmail() {
		return Email;
	}

	public void setEmail(String email) {
		Email = email;
	}

	public String getWeb() {
		return web;
	}

	public void setWeb(String web) {
		this.web = web;
	}

	public String getFax() {
		return fax;
	}

	public void setFax(String fax) {
		this.fax = fax;
	}

	public Date getDateAdd() {
		return dateAdd;
	}

	public void setDateAdd(Date dateAdd) {
		this.dateAdd = dateAdd;
	}

	public Date getDateUpdate() {
		return dateUpdate;
	}

	public void setDateUpdate(Date dateUpdate) {
		this.dateUpdate = dateUpdate;
	}

	public List<Reservierung> getReservierung() {
		return reservierung;
	}

	public void setReservierung(List<Reservierung> reservierung) {
		this.reservierung = reservierung;
	}
	
	
	
	
	
	
	
	

}
